import requests
import unittest

class Register(unittest.TestCase):
    def test_success(self):
        data = {'username':'aaaaaaa',
                'password':'1111111',
                'email':'gavinsun@qq.com'}
        url = 'http://127.0.0.1:8000/account/register/'
        resp = requests.post(url,data=data)
        print(type(resp.json()))
        self.assertEqual('{"msg":"register success!"}',resp.text)

if __name__=='__main__':
    unittest.main()


